package com.lynu.mapper;

import com.lynu.pojo.Headline;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lynu.pojo.Type;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
* @author 31536
* @description 针对表【news_headline】的数据库操作Mapper
* @createDate 2024-04-15 21:33:13
* @Entity com.lynu.pojo.Headline
*/
public interface HeadlineMapper extends BaseMapper<Headline> {
    List<Headline> findNewsPages(@Param("keyWords") String keyWords, @Param("type") Integer type, @Param("offset") Integer offset, @Param("pageSize") Integer pageSize);

    Map selectMapByHid(@Param(value = "hid") Integer hid);
    void updateViews(@Param(value = "hid")Integer hid);

    void publish(@Param(value = "title") String title,@Param(value = "article") String article,@Param(value = "type") Integer type,@Param(value = "publisher") Integer publisher);
    void removeByHid(@Param(value = "hid") Integer hid);
}




